package dfs;

import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;

/**
 * @author 帅小伙
 * @date 2021/12/29
 * @description
 */
public class Demo01JZ78层次打印 {


    public class TreeNode {
        int val = 0;
        TreeNode left = null;
        TreeNode right = null;

        public TreeNode(int val) {
            this.val = val;

        }

    }

    public class Solution {
        ArrayList<ArrayList<Integer>> Print(TreeNode pRoot) {
            ArrayList<ArrayList<Integer> >  res = new ArrayList<>();
            if(pRoot == null){
                return res;
            }
            ArrayList<Integer> l =new ArrayList<>();
            Deque<TreeNode> treeNodes = new ArrayDeque<>();
            treeNodes.addLast(pRoot);
            int t = 0;
            int count = 0;
            ArrayList<Integer> list = null;
            while(!treeNodes.isEmpty()){
                if(count == 0){
                    list = new ArrayList<>();
                }
                treeNodes.pop();
            }

            return res;
        }

    }
}
